1. Technical Field of the Invention
The present invention relates generally to image sensors, and specifically to image processing of sensor values.
2. Description of Related Art
Electronic image sensors are predominately of two types: CCDs (Charge Coupled Devices) and CMOS-APS (Complimentary Metal Oxide Semiconductor-Active Pixel Sensors). Both types of sensors typically contain an array of photo-detectors, arranged in a pattern, that sample light and/or color within an image. Each photo-detector corresponds to a pixel of an image and measures the intensity of light of the pixel within one or more ranges of wavelengths.
In addition, both types of sensors may include a color filter array (CFA), such as the CFA described in U.S. Pat. No. 3,971,065 to Bayer (hereinafter referred to as Bayer), which is hereby incorporated by reference. With the Bayer CFA, each pixel sees only one wavelength range, corresponding to the perceived color red, green or blue. The Bayer mosaic pattern of color filters is shown below (the letters R, G1, G2, and B represent the colors red, green on the red rows, green on the blue rows, and blue, respectively, for a single pixel).
RG1RG1RG2BG2BG2RG1RG1RG2BG2BG2RG1RG1R
To obtain the sensor values for all three primary colors at a single pixel location, it is necessary to interpolate the color sensor values from adjacent pixels. This process of interpolation is called demosaicing. There are a number of demosaicing methods known today. By way of example, but not limitation, various demosaicing methods have included pixel replication, bilinear interpolation and median interpolation.
Many of the existing demosaicing algorithms interpolate the missing sensor values from neighboring sensor values of the same color plane, under the assumption that the sensor values of neighboring pixels are highly correlated in an image (hereinafter referred to as the neighboring correlation assumption). However, for image regions with sharp lines and edges, the correlation among neighboring pixels may be poor. Therefore, demosaicing based on the neighboring correlation assumption may generate color aliasing artifacts along edges and in regions with fine details. In addition, neighboring correlation assumption demosaicing methods may generate images with independent noise levels among the color planes, resulting in higher noise amplification during color correction processing.
Other demosaicing algorithms have incorporated both the neighboring sensor values and the raw sensor value of the current pixel when calculating the missing color values. Such algorithms operate under the assumption that different color sensor values of the same pixel are usually highly correlated (hereinafter referred to as the color correlation assumption). The correlation among the different colors is assumed to either be fixed for all images or the same across a single image. Color correlation assumption demosaicing methods can offer improved edge and line reconstruction with less chromatic aliasing. However, in some images, the improved edge and line reconstruction comes at the cost of reduced color saturation due to assumptions of fixed positive correlation among different color planes. Therefore, what is needed is a demosaicing algorithm that improves edge and line reconstruction in an image without reduced color saturation. In addition, what is needed is a demosaicing algorithm that is tolerant of noise amplification during the color correction process.